package com.xuchaotong.ribbon.controller;

import com.xuchaotong.ribbon.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 311633
 * @version 1.0
 * @ClassName:
 * @Description:
 * @date 2017/11/3 15:30
 */
@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;


    @RequestMapping(value = "/hi")
    public String sayHi(@RequestParam String name){
        return helloService.hiService(name) + ",this's ribbon consumer";
    }

}
